import torch
from torch import nn


class MyModule(nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self,input):
        output = input + 1
        return output


mymodule = MyModule()#通过上上面的模板创建出来的神经网络
x = torch.tensor(1.0)
output = mymodule(x)
print(output)